﻿@using RiderShop.Mobile.Common.Component
@model  RiderShop.Mobile.Modle.Purchase.OrderCompletedModel

@section header  {
    <div data-role="header">
        <a href="~/Home" data-role="button">返回</a>
        <h1>订单提交成功</h1>
    </div>
}
<div class="orderSuccess">
    <dl>
        <dt class="blue msg">
            <s class="success"></s>
            <p class="f16">您的订单已交成功，
                @if (Model.ArrivePay)
                {
                    <span>我们将安排尽快发货</span>
                                         
                } else
                {
                    <span>请您立即付款</span>
                }!</p>
        </dt>

        <!--情况1：在线支付-->
        <dd>
            <p><label>应付金额：</label><span class="orange f14">￥@Model.OrderPayAmount</span></p>
            @if (Model.ArrivePay)
            {
                <p><label>付款方式：</label><span class="blue f14">货到付款</span></p>
            }
            else if(!Model.IsPayCompleted)
            {
                <p><label>付款方式：</label><span class="blue f14">支付宝</span></p>
                <p><a href="~/Purchase/Payment?orderNumber=@Model.OrderNumber.Trim()&orderType=1" data-role="button" data-theme="a">立即付款</a></p>
                <p><label>付款方式：</label><span class="blue f14"></span></p>
                <p><a href="http://trade.3tkfk.com/wxpay/tgpayjsapi?orderNumber=@Model.OrderNumber.Trim()" data-role="button" data-theme="a">   </a></p>
            }
        </dd>
        <dd></dd>
        @if (Model.ArrivePay)
        {
            <dd>
                <p><span class="tip">配送：如果您的订单分别在多个商家购买，因此会根据商家拆分订单进行配送。给您造成不便，敬请谅解。</span></p>
            </dd>
        }
        else
        {
            <dd>
                <p><span class="tip">支付：请您下订单后尽快使用一卡通付款。我们将保留您的订单48小时，如48小时后仍然没有收到您的付款，我们将自动取消此订单。</span></p>
            </dd>
        }
        <dd class="btnLine">
            <a href="~/Home" data-role="button">继续逛一逛</a>
            <a href="~/MyAccount/OrderList" data-role="button">查看我的订单</a>
        </dd>
    </dl>
</div>
@if(Model.IsPayCompleted)
{
  <script language="javascript" type="text/javascript">
    $(document).ready(function() {
        window.location = "PaymentCompleted" + "?orderNumber=" + @Model.OrderNumber;
    });
   </script>
}
